home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
maxhead2.arc
/
MAXHEAD2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-08-28
|
6KB
|
211 lines
{$U+}
Program MaxHeadroom(Input,Output,Disk);
{ by Robert Kemmetmueller, but don't tell anyone, I stole the speech routines }
{ Version 2- same as version 1 but he says more & there's a translation on the
bottom of the screen while he talks }
{
This is the Turbo Pascal include-file for the speech driver. The
parameter S must be a character string containing valid phoneme codes:
CODE SOUND (capitalized in sample word)
---- -----
A mAke = m-A-k
AE bAt = b-AE-t
AH cAr = k-AH-r
AW dOg = d-AW-g
B Bat = B-ae-t
CH CHeese = CH-ee-z
D Dog = D-aw-g
EE bE = b-EE
EH bEt = b-EH-t
F raFt = r-ae-F-t
G Go = G-oh
H Hive = H-i-v
I tIme = t-I-m
IH sIt = s-IH-t
J Jet = J-eh-t
K Kill = K-ih-l
L Love = L-uh-v
M Map = M-ae-p
N Nab = N-ae-b
OH gO = g-OH
OO gOO = g-OO
P Pat = P-ae-t
R Rat = R-ae-t
S Sat = S-ae-t
SH SHe = SH-ee
T Tap = T-ae-p
TH THin = TH-ih-n
TZ THis = TZ-ih-s
U wOrd = w-U-r-d
UH bUt = b-UH-t
V Vat = V-ae-t
W With = W-ih-th
WH WHich = WH-ih-ch
Y Yes = Y-eh-s
Z Zap = Z-ae-p
ZH viSion = v-ih-ZH-eh-n
- inter-phoneme separator
space inter-word pause
}
Type
SpeechString= String[255];
Line= Array[1..80] of Integer;
Screen= Array[1..24] of Line;
TwoScreens= Array[1..2] of Screen;
Registers= Record
AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags: Integer;
end;
Var
Disk: File of TwoScreens;
Scrns: TwoScreens;
Scrn: Screen Absolute $B800:$0000;
Closed: Screen;
Regs: Registers;
I,J,K: Integer;
Procedure Say(S: SpeechString); External 'C:SPEECH.BIN';
Procedure Scrn0;
Begin
Scrn:=Scrns[1];
End;
Procedure Scrn1;
Begin
Scrn:=Scrns[2];
End;
BEGIN
TextMode(C80); TextColor(7); TextBackground(7); ClrScr;
TextBackground(0); GotoXY(1,25); Writeln;
{ Read in screen data }
Assign(Disk,'MAXHEAD2.DAT'); Reset(Disk);
Read(Disk,Scrns); Close(Disk);
GotoXY(1,25); TextColor(15);
{ Draw closed box }
For I:=0 to 2 do
For J:=1 to 80 do begin
Scrn[1+I,J]:=$08DB+$0700*Ord(I=2);
If I<2 then Scrn[24-I,J]:=$08DB+$0700*Ord(I=1);
end;
For I:=0 to 10 do
For J:=3 to 23 do begin
Scrn[J,1+I]:=$08DB+$0700*Ord(I>8);
Scrn[J,80-I]:=$08DB+$0700*Ord(I>8);
end;
Closed:=Scrn;
Delay(2000);
{ Open box }
For I:=24 downto 1 do begin
Scrn[I]:=Scrns[1,I];
Sound(500-((I+5) mod 6)*10-I*10);
Delay(I*2+20); end;
NoSound;
{ Make Max talk }
GotoXY(12,25);
Write('Greetings! ');
Scrn1; Say('G');
Scrn0; Say(' ');
Scrn1; Say('G-uh-r');
Scrn0; Say('ee');
Scrn1; Say('t-ih-n-g-z');
Scrn0; Say(' ');
Write('This ');
Scrn1; Say('Tz-ih-s');
Scrn0; Say('s ');
Write('is ');
Scrn1; Say('ih-z');
Scrn0; Say(' ');
Write('Max Headroom. ');
For I:=1 to 3 do begin
Scrn1; Say('M');
Scrn0; Delay(10); end;
Scrn1; Say('ae-k-s');
Scrn0; Say(' ');
Scrn1; Say('H-eh-d');
Scrn0; Say('r');
Scrn1; Say('oo-m');
Scrn0; Say(' ');
Write('Pepsi ');
Scrn1; Say('P-eh');
Scrn0; Say('p');
Scrn1; Say('s-ee');
Scrn0; Say(' ');
Write('drinkers ');
Scrn1; Say('D-r-ih-n');
Scrn0; Say('k');
Scrn1; Say('u-r-z');
Scrn0; Say(' ');
Write('are ');
Scrn1; Say('Ah-r');
Scrn0; Say(' ');
Write('DWEEBS! ');
For I:=1 to 3 do begin
Scrn1; Say('D');
Scrn0; Delay(10); end;
Scrn1; Say(' D-w-w-ee-b-z');
Scrn0; Say(' ');
GotoXY(1,25); Write('':79); GotoXY(25,25);
Write('Give ');
Scrn1; Say('G-ih-v');
Scrn0; Say(' ');
Write('me ');
Scrn1; Say('m-ee');
Scrn0; Say(' ');
Write('a ');
Scrn1; Say('uh');
Scrn0; Say(' ');
Write('Coke, ');
For I:=1 to 3 do begin
Scrn1; Say('K');
Scrn0; Delay(10); end;
Scrn1; Say('oh-k');
Scrn0; Say(' ');
Write(#39'cuz ');
Scrn1; Say('k-uh-z');
Scrn0; Say(' ');
Write('it'#39's ');
Scrn1; Say('ih-t-s');
Scrn0; Say(' ');
Write('K-K00L! ');
For I:=1 to 5 do begin
Scrn1; Say('K');
Scrn0; Delay(5); end;
Say(' ');
Scrn1; Say('K-oo-l');
Scrn0; Say(' ');
GotoXY(1,25); Write('':79); GotoXY(30,25);
TextColor(7); Write('Catch the Wave ');
TextColor(12); Write('Coke'); TextColor(7);
GotoXY(80,24);
Scrn1; Say('K'); Scrn0; Delay(10);
Scrn1; Say('K-eh-t-ch');
Scrn0; Say(' ');
Scrn1; Say('th-uh');
Scrn0; Say(' ');
Scrn1; Say('W-a-v');
Scrn0; Say(' ');
Scrn1; Say('K-K-oh-k');
Scrn0; Say(' ');
{ Make Max laugh }
For I:=1 to 3 do begin
Scrn1; Say('H-ah');
Scrn0; Delay(10); end;
{ Shut the door }
For I:=1 to 24 do begin
Scrn[I]:=Closed[I];
Sound(500-((I+5) mod 6)*10-I*10);
Delay(I*2+20); end;
NoSound;
Delay(2000);
ClrScr;
END.